﻿// --------------------------------------------------------------------------------------
// 	文 件 名: mtStruct_Device.cs
// --------------------------------------------------------------------------------------
// 	创建时间: 2021/12/07
// 	版　　本: Version:  1.0.0
// 	版    权: Copyright (C) 2007 - 2021 NUCTECH All Rights Reserved
// 	作    者: chenyu
// --------------------------------------------------------------------------------------
// 	说    明: MTS - 数据结构定义。
// --------------------------------------------------------------------------------------
// 	修改历史:
// 			日期							改动
//		2021.12.08						  创建模块
// --------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using SH;
namespace MTS
{


	public class mtResetCmdInfo : mtObject, shISerializeable
	{
		uint m_nResetCmd = 0;    //0未知
		uint m_nParam1 = 0;
		uint m_nParam2 = 0;

        public uint ResetCmd { get => m_nResetCmd; set => m_nResetCmd = value; }
        public uint Param1 { get => m_nParam1; set => m_nParam1 = value; }
        public uint Param2 { get => m_nParam2; set => m_nParam2 = value; }

        public mtResetCmdInfo()
			: base(0)

		{
		}

		mtResetCmdInfo(uint nResetCmd, uint nParam1, uint nParam2)
			: base(0)
		{
			m_nResetCmd = nResetCmd;
			m_nParam1 = nParam1;
			m_nParam2 = nParam2;
		}


        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nResetCmd);
			sc.serialize(ref m_nParam1);
			sc.serialize(ref m_nParam2);

			return sc;
		}
	}

	public class mtCargoCountInfo : mtObject, shISerializeable
	{
		uint m_nTotalCargoNum = 0;
		uint m_nTotalSusCargoNum = 0;
		uint m_nTodayCargoNum = 0;
		uint m_nTodaySusCargoNum = 0;
		public mtCargoCountInfo()
				: base(0)
		{
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nTotalSusCargoNum);
			sc.serialize(ref m_nTotalCargoNum);
			sc.serialize(ref m_nTodayCargoNum);
			sc.serialize(ref m_nTodaySusCargoNum);
			return sc;
		}

		public uint TotalCargoNum { get => m_nTotalCargoNum; set => m_nTotalCargoNum = value; }
		public uint TotalSusCargoNum { get => m_nTotalSusCargoNum; set => m_nTotalSusCargoNum = value; }
		public uint TodayCargoNum { get => m_nTodayCargoNum; set => m_nTodayCargoNum = value; }
		public uint TodaySusCargoNum { get => m_nTodaySusCargoNum; set => m_nTodaySusCargoNum = value; }
	}

	public class mtSceneRequest : mtObject, shISerializeable
	{
		emSysScene m_sysScene = emSysScene.emSysScene_Unknown;

		emSysSceneStatus m_sysStatus = emSysSceneStatus.emSysSceneStatus_Unknown;
		public
			mtSceneRequest()
				: base(0)
		{
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_sysScene);
			sc.serialize(ref m_sysStatus);

			return sc;
		}
		public emSysScene SysScene { get => m_sysScene; set => m_sysScene = value; }


		public emSysSceneStatus SysStatus { set => m_sysStatus = value; get => m_sysStatus; }
	}

	public class mtSceneResponse : mtObject, shISerializeable
	{
		emDevScene m_devScene = emDevScene.emDevScene_Unknown; //当前的设备场景

		emSceneStage m_devStage = emSceneStage.emSceneStage_Unknown; //当前的设备阶段

		emDevSceneStatus m_devStatus = emDevSceneStatus.emDevSceneStatus_Unknown;  // 当前的设备场景状态

		bool m_bCanChange = false;  //是否能转换
		public mtSceneResponse()
			: base(0)
		{ }

		public mtSceneResponse(emDevScene nDevScene, emSceneStage nDevStage, emDevSceneStatus nDevStatus, bool nCanChange)
		: base(0)

		{
			m_devScene = nDevScene;
			m_devStage = nDevStage;
			m_devStatus = nDevStatus;
			m_bCanChange = nCanChange;

		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_devScene);
			sc.serialize(ref m_devStage);
			sc.serialize(ref m_devStatus);
			sc.serialize(ref m_bCanChange);
			return sc;
		}

		public emDevScene DevScene { get => m_devScene; set => m_devScene = value; }
		public emSceneStage DevStage { get => m_devStage; set => m_devStage = value; }
		public emDevSceneStatus DevStatus { get => m_devStatus; set => m_devStatus = value; }
		public bool CanChange { get => m_bCanChange; set => m_bCanChange = value; }

	}

	public class mtSceneStepInfo : mtObject, shISerializeable
	{
		bool m_bFinish = false;

		emDevScene m_devScene = emDevScene.emDevScene_Unknown; //当前的设备场景

		emSceneStage m_devStage = emSceneStage.emSceneStage_Unknown; //当前的设备阶段

		emDevSceneStatus m_devStatus = emDevSceneStatus.emDevSceneStatus_Unknown;  // 当前的设备场景状态
		public mtSceneStepInfo()
				: base(0)
		{
		}
		public mtSceneStepInfo(emDevScene nDevScene, emSceneStage nDevStage, emDevSceneStatus nDevStatus, bool nFinish)
		: base(0)

		{
			m_devScene = nDevScene;
			m_devStage = nDevStage;
			m_devStatus = nDevStatus;
			m_bFinish = nFinish;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_bFinish);
			sc.serialize(ref m_devScene);
			sc.serialize(ref m_devStage);
			sc.serialize(ref m_devStatus);

			return sc;
		}
		public bool Finish { get => m_bFinish; set => m_bFinish = value; }
		public emDevScene DevScene { get => m_devScene; set => m_devScene = value; }
		public emSceneStage DevStage { get => m_devStage; set => m_devStage = value; }
		public emDevSceneStatus DevStatus { get => m_devStatus; set => m_devStatus = value; }
	}

	public class mtScanRequest : mtObject, shISerializeable
	{
		emScanType m_nScanType = emScanType.emScanType_Unknown;
		new ulong m_timeStamp = 0;
		uint m_nCargoId = 0;
		public mtScanRequest()
				: base(0)

		{
		}
		public mtScanRequest(emScanType nScanType, ulong nTimeStamp)
		: base(0)
		{
			m_nScanType = nScanType;
			m_timeStamp = nTimeStamp;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);

			sc.serialize(ref m_nScanType);
			sc.serialize(ref m_timeStamp);
			sc.serialize(ref m_nCargoId);

			return sc;
		}

		public emScanType ScanType { get => m_nScanType; set => m_nScanType = value; }
		public new ulong TimeStamp { get => m_timeStamp; set => m_timeStamp = value; }

		public uint CargoID { get => m_nCargoId; set => m_nCargoId = value; }
	}

	public class mtScanResponse : mtObject, shISerializeable
	{
		//string	m_prn;
		//shImageID_t		m_nImageID;
		new string m_deviceID;

		public
			mtScanResponse()
				: base(0)
		/*, m_nImageID(0)*/
		{
		}

		public mtScanResponse(/* string prn, */string nDeviceID)
		: base(0)
		/*, m_prn(prn)*/
		/*, m_deviceID(nDeviceID)*/
		{
			m_deviceID = nDeviceID;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);

			//	sc.serialize(m_nImageID);
			sc.serialize(ref m_deviceID);
			//	sc.serialize(m_prn);

			return sc;
		}
		//shImageID_t ImageID()  { return m_nImageID; }
		public new string DeviceID { get => m_deviceID; set => m_deviceID = value; }
		// string Prn()  { return m_prn; }

		// void Prn( string prn) { m_prn = prn; }
		//void ImageID(shImageID_t nImageID) { m_nImageID = nImageID; }

	}

	public class mtScanStepInfo : mtObject, shISerializeable
	{
		new string m_deviceID;
		string m_prn;
		ulong m_nImageID = 0;
		emScanType m_scanType = emScanType.emScanType_Unknown;
		uint m_nStatMask = 0;
		bool m_bFinish = false;
		public
			mtScanStepInfo()
				: base(0)

		{
		}
		public mtScanStepInfo(emScanType nScanType, string prn, string nDeviceID, uint nStatMask, bool nFinish)
		: base(0)

		{
			m_scanType = nScanType;
			m_prn = prn;
			m_deviceID = nDeviceID;
			m_nStatMask = nStatMask;
			m_bFinish = nFinish;
		}



		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_deviceID);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_scanType);
			sc.serialize(ref m_nStatMask);
			sc.serialize(ref m_bFinish);

			return sc;
		}
		public ulong ImageId { get => m_nImageID; set => m_nImageID = value; }

		public string Prn { get => m_prn; set => m_prn = value; }


		public new string DeviceID { get => m_deviceID; set => m_deviceID = value; }


		public emScanType ScanType { get => m_scanType; set => m_scanType = value; }


		public bool Finish { get => m_bFinish; set => m_bFinish = value; }


		public uint StatMask { get => m_nStatMask; set => m_nStatMask = value; }

	};

	/// <summary>
	/// 探测器参数
	/// </summary>
	public class mtDetParam : mtObject, shISerializeable
	{
		uint m_nDetColId = 0;    //探测器臂id，从1开始
		List<uint> m_vecDetZoneId = new List<uint>();    //探测器模块组id，标号从1开始

		public mtDetParam()
				: base(0)

		{
		}

		public mtDetParam(uint nDetColId, List<uint> vecDetZoneId)
			: base(0)

		{
			m_nDetColId = nDetColId;
			m_vecDetZoneId = vecDetZoneId;

		}



		public new shISerializer serialize(shISerializer sc)
		{
			sc.serialize(ref m_nDetColId);
			sc.serialize(ref m_vecDetZoneId);

			return sc;
		}

		public uint DetColId
		{
			get => m_nDetColId; set => m_nDetColId = value;
		}



		public List<uint> DetZoneId
		{
			get => m_vecDetZoneId; set => m_vecDetZoneId = value;
		}


	}

	//标定的结构定义
	public class mtCalibRequest : mtObject, shISerializeable
	{
		string m_strCalibPrn;
		uint m_nCalibCmd = 0;            //1-开始标定流程；2-停止标定流程
		List<uint> m_vecSourceId = new List<uint>();         //加速器Id
		List<mtDetParam> m_vecCalibParam = new List<mtDetParam>();        //探测器参数

		public

			mtCalibRequest()
				: base(0)
		{
		}

		public mtCalibRequest(string strCalibPrn, uint nCalibCmd, List<uint> vecSourceId, List<mtDetParam> vecCalibParam)
		: base(0)


		{
			m_strCalibPrn = strCalibPrn;
			m_nCalibCmd = nCalibCmd;
			m_vecSourceId = vecSourceId;
			m_vecCalibParam = vecCalibParam;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strCalibPrn);
			sc.serialize(ref m_nCalibCmd);
			sc.serialize(ref m_vecSourceId);
			sc.serialize(m_vecCalibParam);

			return sc;
		}


		public string CalibPrn
		{
			get => m_strCalibPrn; set => m_strCalibPrn = value;
		}

		public uint CalibCmd
		{
			get => m_nCalibCmd; set => m_nCalibCmd = value;
		}



		public List<uint> SourceIds
		{
			get => m_vecSourceId; set => m_vecSourceId = value;
		}



		public List<mtDetParam> DetParams
		{
			get => m_vecCalibParam; set => m_vecCalibParam = value;
		}


	}

	public class mtCalibRespone : mtObject, shISerializeable
	{
		uint m_nResult = 0;          // 依据错误码返回

		public

			mtCalibRespone()
				: base(0)
		{
		}

		public mtCalibRespone(uint nResult, ulong nTimeStamp)
		: base(0)
		{
			m_nResult = nResult;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nResult);

			return sc;
		}

		public uint Result { get => m_nResult; set => m_nResult = value; }

	};

	public class mtCalibStepInfo : mtObject, shISerializeable
	{
		string m_strCalibPrn;
		emScanType m_scanType = emScanType.emScanType_Unknown;
		uint m_nStepMask;

		uint m_nDetColID = 0;    //探测器臂id，从1开始
		uint m_nDetZoneID = 0;   //探测器模块组id，从1开始，0表示不分组
		emMatType m_matType = 0;        //材料材料类型
		uint m_nMatThick = 0;    //材料厚度，单位：毫米
		bool m_bFinish = false;

		public
			mtCalibStepInfo()
				: base(0)
		{
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);

			sc.serialize(ref m_strCalibPrn);
			sc.serialize(ref m_scanType);
			sc.serialize(ref m_nStepMask);
			sc.serialize(ref m_nDetColID);
			sc.serialize(ref m_nDetZoneID);
			sc.serialize(ref m_matType);
			sc.serialize(ref m_nMatThick);
			sc.serialize(ref m_bFinish);

			return sc;
		}

		public string CalibPrn
		{
			get => m_strCalibPrn; set => m_strCalibPrn = value;
		}
        public emScanType ScanType { get => m_scanType; set => m_scanType = value; }
        public uint StepMask { get => m_nStepMask; set => m_nStepMask = value; }
        public uint DetColId { get => m_nDetColID; set => m_nDetColID = value; }
        public uint DetZoneId { get => m_nDetZoneID; set => m_nDetZoneID = value; }
        public emMatType MatType { get => m_matType; set => m_matType = value; }
        public uint MatThick { get => m_nMatThick; set => m_nMatThick = value; }
        public bool IsFinish { get => m_bFinish; set => m_bFinish = value; }
		
	}
	/// <summary>
	/// 双能标定瞄准请求
	/// </summary>
	public class mtAimingRequest : mtObject, shISerializeable
	{
		uint m_nAimingCmd;   //1-开始瞄准流程；2-停止瞄准流程
		uint m_nSourceID;    //加速器id
		uint m_nDetColID;    //探测器臂id，从1开始
		uint m_nDetZoneID;   //探测器模块组id，从1开始，0表示不分组

        public uint AimingCmd { get => m_nAimingCmd; set => m_nAimingCmd = value; }
        public uint SourceID { get => m_nSourceID; set => m_nSourceID = value; }
        public uint DetColID { get => m_nDetColID; set => m_nDetColID = value; }
        public uint DetZoneID { get => m_nDetZoneID; set => m_nDetZoneID = value; }

        public mtAimingRequest()
			: base(0)
		{
		}

		public mtAimingRequest(uint nAimingCmd, uint nSourceId, uint nDetColId, uint nDetZoneId)
			: base(0)

		{
			m_nAimingCmd = nAimingCmd;
			m_nSourceID = nSourceId;
			m_nDetColID = nDetColId;
			m_nDetZoneID = nDetZoneId;

		}

		public mtAimingRequest(mtObject other, uint nAimingCmd, uint nSourceId,
			 uint nDetColId, uint nDetZoneId)
			: base(other)

		{
			m_nAimingCmd = nAimingCmd;
			m_nSourceID = nSourceId;
			m_nDetColID = nDetColId;
			m_nDetZoneID = nDetZoneId;

		}




		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);

			sc.serialize(ref m_nAimingCmd);
			sc.serialize(ref m_nSourceID);
			sc.serialize(ref m_nDetColID);
			sc.serialize(ref m_nDetZoneID);

			return sc;
		}
	}

	//配电室信息
	//class mtPowerRoomInfo : mtObject
	/*{
	int m_valPhaseA;
	int m_valPhaseB;
	int m_valPhaseC;

	int m_curPhaseA;
	int m_curPhaseB;
	int m_curPhaseC;

	int m_activePower;
	int m_ractivePower;
	int m_apparentPower;
	int m_powerFactor;
	int m_frequency;
	int m_upsElecInfo;
	int m_upsInputVol;
	int m_upsOutputVol;
	int m_upsOutputCur;
	public
	mtPowerRoomInfo()
		:mtObject(MTS_DIAG_POWER_ROOM_STEPINFO_VER1)
		, m_valPhaseA(0)
		, m_valPhaseB(0)
		, m_valPhaseC(0)
		, m_curPhaseA(0)
		, m_curPhaseB(0)
		, m_curPhaseC(0)
		, m_activePower(0)
		, m_ractivePower(0)
		, m_apparentPower(0)
		, m_powerFactor(0)
		, m_frequency(0)
		, m_upsElecInfo(0)
		, m_upsInputVol(0)
		, m_upsOutputVol(0)
		, m_upsOutputCur(0)
	{
	}
	mtPowerRoomInfo(int nvalPhaseA,int nvalPhaseB,int nvalPhaseC,int ncurPhaseA,int ncurPhaseB,
				  int ncurPhaseC,int nactivePower,int nractivePower,int napparentPower,int npowerFactor,
				  int nfrequency,int nupsElecInfo,int nupsInputVol,int nupsOutputVol,int nupsOutputCur)
		:mtObject(MTS_DIAG_POWER_ROOM_STEPINFO_VER1)
		, m_valPhaseA(nvalPhaseA)
		, m_valPhaseB(nvalPhaseB)
		, m_valPhaseC(nvalPhaseC)
		, m_curPhaseA(ncurPhaseA)
		, m_curPhaseB(ncurPhaseB)
		, m_curPhaseC(ncurPhaseC)
		, m_activePower(nactivePower)
		, m_ractivePower(nractivePower)
		, m_apparentPower(napparentPower)
		, m_powerFactor(npowerFactor)
		, m_frequency(nfrequency)
		, m_upsElecInfo(nupsElecInfo)
		, m_upsInputVol(nupsInputVol)
		, m_upsOutputVol(nupsOutputVol)
		, m_upsOutputCur(nupsOutputCur)
	{
	}
	mtPowerRoomInfo( mtPowerRoomInfo other)
		:base(other)
		, m_valPhaseA(other.m_valPhaseA)
		, m_valPhaseB(other.m_valPhaseB)
		, m_valPhaseC(other.m_valPhaseC)
		, m_curPhaseA(other.m_curPhaseA)
		, m_curPhaseB(other.m_curPhaseB)
		, m_curPhaseC(other.m_curPhaseC)
		, m_activePower(other.m_activePower)
		, m_ractivePower(other.m_ractivePower)
		, m_apparentPower(other.m_apparentPower)
		, m_powerFactor(other.m_powerFactor)
		, m_frequency(other.m_frequency)
		, m_upsElecInfo(other.m_upsElecInfo)
		, m_upsInputVol(other.m_upsInputVol)
		, m_upsOutputVol(other.m_upsOutputVol)
		, m_upsOutputCur(other.m_upsOutputCur)
	{
	}
	mtPowerRoomInfo operator = ( mtPowerRoomInfo other)
	{
		if (this!=other)
		{
			base.operator=(other);
			m_valPhaseA = other.m_valPhaseA;
			m_valPhaseB = other.m_valPhaseB;
			m_valPhaseC = other.m_valPhaseC;
			m_curPhaseA = other.m_curPhaseA;
			m_curPhaseB = other.m_curPhaseB;
			m_curPhaseC = other.m_curPhaseC;
			m_activePower = other.m_activePower;
			m_ractivePower = other.m_ractivePower;
			m_apparentPower = other.m_apparentPower;
			m_powerFactor = other.m_powerFactor;
			m_frequency = other.m_frequency;
			m_upsElecInfo = other.m_upsElecInfo;
			m_upsInputVol = other.m_upsInputVol;
			m_upsOutputVol = other.m_upsOutputVol;
			m_upsOutputCur = other.m_upsOutputCur;
		}
		return *this;
	}
	template<class _SER>
	_SER serialize(_SER sc)
	{
		base.serialize(sc);
		sc.serialize(m_valPhaseA);
		sc.serialize(m_valPhaseB);
		sc.serialize(m_valPhaseC);
		sc.serialize(m_curPhaseA);
		sc.serialize(m_curPhaseB);
		sc.serialize(m_curPhaseC);
		sc.serialize(m_activePower);
		sc.serialize(m_ractivePower);
		sc.serialize(m_apparentPower);
		sc.serialize(m_powerFactor);
		sc.serialize(m_frequency);
		sc.serialize(m_upsElecInfo);
		sc.serialize(m_upsInputVol);
		sc.serialize(m_upsOutputVol);
		sc.serialize(m_upsOutputCur);
		return sc;
	}
	void ValPhaseA (int valPhaseA) { m_valPhaseA= valPhaseA;}
	void ValPhaseB (int valPhaseB) { m_valPhaseB= valPhaseB;}
	void ValPhaseC (int valPhaseC) { m_valPhaseC= valPhaseC;}
	void CurPhaseA (int curPhaseA) { m_curPhaseA= curPhaseA;}
	void CurPhaseB (int curPhaseB) { m_curPhaseB= curPhaseB;}
	void CurPhaseC (int curPhaseC) { m_curPhaseC= curPhaseC;}
	void ActivePower (int activePower) { m_activePower= activePower;}
	void RactivePower (int ractivePower) { m_ractivePower= ractivePower;}
	void ApparentPower (int apparentPower) { m_apparentPower= apparentPower;}
	void PowerFactor (int powerFactor) { m_powerFactor= powerFactor;}
	void Frequency (int frequency) { m_frequency= frequency;}
	void UpsElecInfo (int upsElecInfo) { m_upsElecInfo= upsElecInfo;}
	void UpsInputVol (int upsInputVol) { m_upsInputVol= upsInputVol;}
	void UpsOutputVol (int upsOutputVol) { m_upsOutputVol= upsOutputVol;}
	void UpsOutputCur (int upsOutputCur) { m_upsOutputCur= upsOutputCur;}

	 int ValPhaseA()  { return m_valPhaseA; }
	 int ValPhaseB()  { return m_valPhaseB; }
	 int ValPhaseC()  { return m_valPhaseC; }
	 int CurPhaseA()  { return m_curPhaseA; }
	 int CurPhaseB()  { return m_curPhaseB; }
	 int CurPhaseC()  { return m_curPhaseC; }
	 int ActivePower()  { return m_activePower; }
	 int RactivePower()  { return m_ractivePower; }
	 int ApparentPower()  { return m_apparentPower; }
	 int PowerFactor()  { return m_powerFactor; }
	 int Frequency()  { return m_frequency; }
	 int UpsElecInfo()  { return m_upsElecInfo; }
	 int UpsInputVol()  { return m_upsInputVol; }
	 int UpsOutputVol()  { return m_upsOutputVol; }
	 int UpsOutputCur()  { return m_upsOutputCur; }
	};
	//自动诊断的结构定义
	*/

	public class mtAutoDiagRequest : mtObject, shISerializeable
	{
		ulong m_id = 0;
		string m_prn;
		emDeviceRequestCmd m_nAutoDiagCmd = emDeviceRequestCmd.emDRC_Unknown;

        public ulong Id { get => m_id; set => m_id = value; }
        public emDeviceRequestCmd AutoDiagCmd { get => m_nAutoDiagCmd; set => m_nAutoDiagCmd = value; }
        public string Prn { get => m_prn; set => m_prn = value; }

        public mtAutoDiagRequest()
		: base(0)

		{
		}
		public mtAutoDiagRequest(ulong id, emDeviceRequestCmd autoDiagCmd)
				: base(0)

		{
			m_nAutoDiagCmd = autoDiagCmd;
			m_id = id;
		}

		public mtAutoDiagRequest(string prn, emDeviceRequestCmd autoDiagCmd)
				: base(0)

		{
			m_nAutoDiagCmd = autoDiagCmd;
			m_prn = prn;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_id);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_nAutoDiagCmd);
			return sc;
		}

	}

	public class mtAutoDiagResponse : mtObject, shISerializeable
	{
		ulong m_id = 0;
		string m_prn;
		uint m_result = 0; //	正确 sc_ec_Success	其它，请求失败错误码,

        public uint Result { get => m_result; set => m_result = value; }

        public
			mtAutoDiagResponse()
				: base(0)

		{
		}
		public mtAutoDiagResponse(string prn, uint nResult)
		: base(0)

		{
			m_id = 0;
			m_prn = prn;
			m_result = nResult;
		}
		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_id);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_result);
			return sc;
		}
	}
	//诊断轨道车的结构定义

	public class mtDiagVehicleRequest : mtObject, shISerializeable
	{
		ulong m_id = 0;
		int m_nVehiclePos = 0; // 0,原点，1，A点，2，B点，3，C点
		emDeviceRequestCmd m_nVehicleCmd = emDeviceRequestCmd.emDRC_Unknown;

		int m_nSwivelTablePos = 0; // 0,原点，1，0，2,90
		emDeviceRequestCmd m_nSwivelTableCmd = emDeviceRequestCmd.emDRC_Unknown;

		int m_nRollerDir = 0; // -1 倒转，1正转
		emDeviceRequestCmd m_nRollerCmd = emDeviceRequestCmd.emDRC_Unknown;

        public int VehiclePos { get => m_nVehiclePos; set => m_nVehiclePos = value; }
        public emDeviceRequestCmd VehicleCmd { get => m_nVehicleCmd; set => m_nVehicleCmd = value; }
        public int SwivelTablePos { get => m_nSwivelTablePos; set => m_nSwivelTablePos = value; }
        public emDeviceRequestCmd SwivelTableCmd { get => m_nSwivelTableCmd; set => m_nSwivelTableCmd = value; }
        public int RollerDir { get => m_nRollerDir; set => m_nRollerDir = value; }
        public emDeviceRequestCmd RollerCmd { get => m_nRollerCmd; set => m_nRollerCmd = value; }


        public
			mtDiagVehicleRequest()
				: base(0)
		{
		}
		public mtDiagVehicleRequest(int nVehiclePos, emDeviceRequestCmd nVehicleCmd, int nSwivelTablePos, emDeviceRequestCmd nSwivelTableCmd, int nRollerDir, emDeviceRequestCmd nRollerCmd)
		: base(0)

		{
			m_id = 0;
			m_nVehiclePos = nVehiclePos;
			m_nVehicleCmd = nVehicleCmd;
			m_nSwivelTablePos = nSwivelTablePos;
			m_nSwivelTableCmd = nSwivelTableCmd;
			m_nRollerDir = nRollerDir;
			m_nRollerCmd = nRollerCmd;
		}
		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_id);
			sc.serialize(ref m_nVehiclePos);
			sc.serialize(ref m_nVehicleCmd);
			sc.serialize(ref m_nSwivelTablePos);
			sc.serialize(ref m_nSwivelTableCmd);
			sc.serialize(ref m_nRollerDir);
			sc.serialize(ref m_nRollerCmd);

			return sc;
		}

	}
	public class mtDiagVehicleResponse : mtObject, shISerializeable
	{
		//ulong m_id = 0;
		uint m_result = 0; //	正确 sc_ec_Success	其它，请求失败错误码,

        public uint Result{ get => m_result; set => m_result = value; }

        public mtDiagVehicleResponse()
				: base(0)

		{
		}
		public mtDiagVehicleResponse(uint nResult)
		: base(0)

		{
			m_result = nResult;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_result);
			return sc;
		}
	}
	//class mtDiagVehicleRunStepInfo : mtObject
	/*{
	private:
		int m_curRunPos;
		int m_curRunSpeed;
		sh_int8_t  m_motRunStatus;    // 0 停止， 1，运转中
	//		bool cur_speed_warning = false;
			int m_setRunPosSpeed;
			int m_setRunNegSpeed;
		public
			mtDiagVehicleRunStepInfo()
				:mtObject(0)
				, m_curRunPos(0)
				, m_curRunSpeed(0)
				, m_motRunStatus(0)
				, m_setRunPosSpeed(0)
				, m_setRunNegSpeed(0)
			{
			}
			mtDiagVehicleRunStepInfo(int ncurRunPos, int ncurRunSpeed, sh_int8_t  nmotRunStatus, int nsetRunPosSpeed,int nsetRunNegSpeed)
				:mtObject(0)
				, m_curRunPos(ncurRunPos)
				, m_curRunSpeed(ncurRunSpeed)
				, m_motRunStatus(nmotRunStatus)
				, m_setRunPosSpeed(nsetRunPosSpeed)
				, m_setRunNegSpeed(nsetRunNegSpeed)
			{
			}
			mtDiagVehicleRunStepInfo( mtDiagVehicleRunStepInfo other)
				:mtObject(other)
				, m_curRunPos(other.m_curRunPos)
				, m_curRunSpeed(other.m_curRunSpeed)
				, m_motRunStatus(other.m_motRunStatus)
				, m_setRunPosSpeed(other.m_setRunPosSpeed)
				, m_setRunNegSpeed(other.m_setRunNegSpeed)
			{
			}
			mtDiagVehicleRunStepInfo operator=( mtDiagVehicleRunStepInfo other)
			{
				if (this != other)
				{
					base.operator=(other);
					m_curRunPos = other.m_curRunPos;
					m_curRunSpeed = other.m_curRunSpeed;
					m_motRunStatus = other.m_motRunStatus;
					m_setRunPosSpeed = other.m_setRunPosSpeed;
					m_setRunNegSpeed = other.m_setRunNegSpeed;
				}
				return *this;
			}
			template<class _SER>
			_SER serialize(_SER sc)
			{
				base.serialize(sc);
				sc.serialize(m_curRunPos);
				sc.serialize(m_curRunSpeed);
				sc.serialize(m_motRunStatus);
				sc.serialize(m_setRunPosSpeed);
				sc.serialize(m_setRunNegSpeed);
				return sc;
			}
			void CurRunPos(int curRunPos) { m_curRunPos = curRunPos; }
			void CurRunSpeed(int curRunSpeed) { m_curRunSpeed = curRunSpeed; }
			void MotRunStatus(sh_int8_t motRunStatus) { m_motRunStatus = motRunStatus; }
			void SetRunPosSpeed(int setRunPosSpeed) { m_setRunPosSpeed = setRunPosSpeed; }
			void SetRunNegSpeed(int setRunNegSpeed) { m_setRunNegSpeed = setRunNegSpeed; }

			 int  CurRunPos()  { return m_curRunPos; }
			 int  CurRunSpeed()  { return m_curRunSpeed; }
			 sh_int8_t  MotRunStatus()  { return m_motRunStatus; }
			 int  SetRunPosSpeed()  { return m_setRunPosSpeed; }
			 int  SetRunNegSpeed()  { return m_setRunNegSpeed; }
		};
		*/

	//class mtDiagVehicleRotateStepInfo : mtObject
	/*{
		int m_curRotPos;
		int m_curRotSpeed;
		sh_int8_t  m_motRotStatus;    // 0 停止， 1，运转中
	//		bool cur_speed_warning = false;
		int m_setRotPosSpeed;
		int m_setRotNegSpeed;
	public
		mtDiagVehicleRotateStepInfo()
			:base(0)
			, m_curRotPos(0)
			, m_curRotSpeed(0)
			, m_motRotStatus(0)
			, m_setRotPosSpeed(0)
			, m_setRotNegSpeed(0)
		{
		}
		mtDiagVehicleRotateStepInfo(int ncurRotPos, int ncurRotSpeed, sh_int8_t  nmotRotStatus,int nsetRotPosSpeed, int nsetRotNegSpeed)
			:base(0)
			, m_curRotPos(ncurRotPos)
			, m_curRotSpeed(ncurRotSpeed)
			, m_motRotStatus(nmotRotStatus)
			, m_setRotPosSpeed(nsetRotPosSpeed)
			, m_setRotNegSpeed(nsetRotNegSpeed)
		{
		}
		mtDiagVehicleRotateStepInfo( mtDiagVehicleRotateStepInfo other)
			:base(other)
			, m_curRotPos(other.m_curRotPos)
			, m_curRotSpeed(other.m_curRotSpeed)
			, m_motRotStatus(other.m_motRotStatus)

			, m_setRotPosSpeed(other.m_setRotPosSpeed)
			, m_setRotNegSpeed(other.m_setRotNegSpeed)
		{
		}
		mtDiagVehicleRotateStepInfo operator=( mtDiagVehicleRotateStepInfo other)
		{
			if (this != other)
			{
				base.operator=(other);
				m_curRotPos = other.m_curRotPos;
				m_curRotSpeed = other.m_curRotSpeed;
				m_motRotStatus = other.m_motRotStatus;

				m_setRotPosSpeed = other.m_setRotPosSpeed;
				m_setRotNegSpeed = other.m_setRotNegSpeed;
			}
			return *this;
		}
		template<class _SER>
		_SER serialize(_SER sc)
		{
			base.serialize(sc);
			sc.serialize(m_curRotPos);
			sc.serialize(m_curRotSpeed);
			sc.serialize(m_motRotStatus);

			sc.serialize(m_setRotPosSpeed);
			sc.serialize(m_setRotNegSpeed);
			return sc;
		}
		void CurRotPos(int curRotPos) { m_curRotPos = curRotPos; }
		void CurRotSpeed(int curRotSpeed) { m_curRotSpeed = curRotSpeed; }
		void MotRotStatus(sh_int8_t motRotStatus) { m_motRotStatus = motRotStatus; }

		void SetRotPosSpeed(int setRotPosSpeed) { m_setRotPosSpeed = setRotPosSpeed; }
		void SetRotNegSpeed(int setRotNegSpeed) { m_setRotNegSpeed = setRotNegSpeed; }

		 int  CurRotPos()  { return m_curRotPos; }
		 int  CurRotSpeed()  { return m_curRotSpeed; }
		 sh_int8_t  MotRotStatus()  { return m_motRotStatus; }

		 int  SetRotPosSpeed()  { return m_setRotPosSpeed; }
		 int  SetRotNegSpeed()  { return m_setRotNegSpeed; }
	};*/

	//class mtDiagVehicleRollerStepInfo : mtObject
	/*{
		int m_curRolSpeed1;
		int m_curRolSpeed2;
		sh_int8_t  m_motRolStatus1;    // 0 停止， 1，运转中
		sh_int8_t  m_motRolStatus2;    // 0 停止， 1，运转中
	public
		mtDiagVehicleRollerStepInfo()
			:base(0)
			, m_curRolSpeed1(0)
			, m_curRolSpeed2(0)
			, m_motRolStatus1(0)
			, m_motRolStatus2(0)
		{
		}
		mtDiagVehicleRollerStepInfo(int ncurRolSpeed1, int ncurRolSpeed2, sh_int8_t  nmotRolStatus1, sh_int8_t nmotRolStatus2)
			:base(0)
			, m_curRolSpeed1(ncurRolSpeed1)
			, m_curRolSpeed2(ncurRolSpeed2)
			, m_motRolStatus1(nmotRolStatus1)
			, m_motRolStatus2(nmotRolStatus2)
		{
		}
		mtDiagVehicleRollerStepInfo( mtDiagVehicleRollerStepInfo other)
			:base(other)
			, m_curRolSpeed1(other.m_curRolSpeed1)
			, m_curRolSpeed2(other.m_curRolSpeed2)
			, m_motRolStatus1(other.m_motRolStatus1)
			, m_motRolStatus2(other.m_motRolStatus2)
		{
		}
		mtDiagVehicleRollerStepInfo operator=( mtDiagVehicleRollerStepInfo other)
		{
			if (this != other)
			{
				base.operator=(other);
				m_curRolSpeed1 = other.m_curRolSpeed1;
				m_curRolSpeed2 = other.m_curRolSpeed2;
				m_motRolStatus1 = other.m_motRolStatus1;
				m_motRolStatus2 = other.m_motRolStatus2;
			}
			return *this;
		}
		template<class _SER>
		_SER serialize(_SER sc)
		{
			base.serialize(sc);
			sc.serialize(m_curRolSpeed1);
			sc.serialize(m_curRolSpeed2);
			sc.serialize(m_motRolStatus1);
			sc.serialize(m_motRolStatus2);
			return sc;
		}
		void CurRolSpeed1(int curRolSpeed1) { m_curRolSpeed1 = curRolSpeed1; }
		void CurRolSpeed2(int curRolSpeed2) { m_curRolSpeed2 = curRolSpeed2; }
		void MotRolStatus1(sh_int8_t motRolStatus1) { m_motRolStatus1 = motRolStatus1; }
		void MotRolStatus2(sh_int8_t motRolStatus2) { m_motRolStatus2 = motRolStatus2; }

		 int  CurRolSpeed1()  { return m_curRolSpeed1; }
		 int  CurRolSpeed2()  { return m_curRolSpeed2; }
		 sh_int8_t  MotRolStatus1()  { return m_motRolStatus1; }
		 sh_int8_t  MotRolStatus2()  { return m_motRolStatus2; }
	};*/

	//class mtDiagVehicleSensorStepInfo : mtObject
	/*{
		//传感器参数，是其中的bit 对应状态
		int  m_sensorVehicle;
		int  m_sensorProtect;

		sh_int8_t   m_readyLight;       // 1 是就绪， 0是没就绪；
		sh_int8_t   m_initLight;        // 1 是初始化完成， 0是没完成；
		sh_int8_t   m_remoteMode;       // 1 是远控， 0是没就地；
		sh_int8_t   m_faultLight;       // 1 是没故障， 0是有故障；
		List<sh_int8_t>   m_faultVec;    //故障码序列
	public
		mtDiagVehicleSensorStepInfo()
			:base(0)
			, m_sensorVehicle(0)
			, m_sensorProtect(0)
			, m_readyLight(0)
			, m_initLight(0)
			, m_remoteMode(0)
			, m_faultLight(0)

		{
		}
		mtDiagVehicleSensorStepInfo(int nsensorVehicle, int nsensorProtect, sh_int8_t nreadyLight,sh_int8_t ninitLight,
							  sh_int8_t nremoteMode, sh_int8_t nfaultLight, List<sh_int8_t>  nfaultVec)
			:base(0)
			, m_sensorVehicle(nsensorVehicle)
			, m_sensorProtect(nsensorProtect)

			, m_readyLight(nreadyLight)
			, m_initLight(ninitLight)
			, m_remoteMode(nremoteMode)
			, m_faultLight(nfaultLight)
			, m_faultVec(nfaultVec)
		{
		}
		mtDiagVehicleSensorStepInfo( mtDiagVehicleSensorStepInfo other)
			:base(other)
			, m_sensorVehicle(other.m_sensorVehicle)
			, m_sensorProtect(other.m_sensorProtect)
			, m_readyLight(other.m_readyLight)
			, m_initLight(other.m_initLight)
			, m_remoteMode(other.m_remoteMode)
			, m_faultLight(other.m_faultLight)
			, m_faultVec(other.m_faultVec)
		{
		}
		mtDiagVehicleSensorStepInfo operator=( mtDiagVehicleSensorStepInfo other)
		{
			if (this != other)
			{
				base.operator=(other);

				m_sensorVehicle = other.m_sensorVehicle;
				m_sensorProtect = other.m_sensorProtect;

				m_readyLight = other.m_readyLight;
				m_initLight = other.m_initLight;
				m_remoteMode = other.m_remoteMode;
				m_faultLight = other.m_faultLight;
				m_faultVec = other.m_faultVec;
			}
			return *this;
		}
		template<class _SER>
		_SER serialize(_SER sc)
		{
			base.serialize(sc);

			sc.serialize(m_sensorVehicle);
			sc.serialize(m_sensorProtect);

			sc.serialize(m_readyLight);
			sc.serialize(m_initLight);
			sc.serialize(m_remoteMode);
			sc.serialize(m_faultLight);
			sc.serialize(m_faultVec);
			return sc;
		}
		void SensorVehicle(int sensorVehicle) { m_sensorVehicle = sensorVehicle; }
		void SensorProtect(int sensorProtect) { m_sensorVehicle = sensorProtect; }

		void ReadyLight(sh_int8_t readyLight) { m_readyLight = readyLight; }
		void InitLight(sh_int8_t initLight) { m_initLight = initLight; }
		void RemoteMode(sh_int8_t remoteMode) { m_remoteMode = remoteMode; }
		void FaultLight(sh_int8_t faultLight) { m_faultLight = faultLight; }
		void FaultVec(List<sh_int8_t> faultVec) { m_faultVec = faultVec; }
		void FaultVec(sh_int8_t faultCode) { m_faultVec.push_back(faultCode); }

		 int  SensorVehicle()  { return m_sensorVehicle; }
		 int  SensorProtect()  { return m_sensorVehicle; }

		 sh_int8_t  ReadyLight()  { return m_readyLight; }
		 sh_int8_t  InitLight()  { return m_initLight; }
		 sh_int8_t  RemoteMode()  { return m_remoteMode; }
		 sh_int8_t  FaultLight()  { return m_faultLight; }
		 List<sh_int8_t>  FaultVec()  { return m_faultVec; }
	};*/

	//class mtDiagVehicleStepInfo : mtObject
	/*{
		mtDiagVehicleRunStepInfo       m_diagVehRunStepInfo;
		mtDiagVehicleRotateStepInfo    m_diagVehRotStepInfo;
		mtDiagVehicleRollerStepInfo    m_diagVehRolStepInfo;
		mtDiagVehicleSensorStepInfo    m_diagVehSensorInfo;
	public
		mtDiagVehicleStepInfo()
			:base(MTS_DIAG_VEHICLE_REQUEST_CUR_VER)
		{
		}
		mtDiagVehicleStepInfo(mtDiagVehicleRunStepInfo ndiagVehRunStepInfo, mtDiagVehicleRotateStepInfo ndiagVehRotStepInfo,
			mtDiagVehicleRollerStepInfo ndiagVehRolStepInfo, mtDiagVehicleSensorStepInfo ndiagVehSensorInfo)
			:base(MTS_DIAG_VEHICLE_REQUEST_CUR_VER)
			, m_diagVehRunStepInfo(ndiagVehRunStepInfo)
			, m_diagVehRotStepInfo(ndiagVehRotStepInfo)
			, m_diagVehRolStepInfo(ndiagVehRolStepInfo)
			, m_diagVehSensorInfo(ndiagVehSensorInfo)
		{
		}
		mtDiagVehicleStepInfo(mtDiagVehicleStepInfo other)
			:base(other)
			, m_diagVehRunStepInfo(other.m_diagVehRunStepInfo)
			, m_diagVehRotStepInfo(other.m_diagVehRotStepInfo)
			, m_diagVehRolStepInfo(other.m_diagVehRolStepInfo)
			, m_diagVehSensorInfo(other.m_diagVehSensorInfo)
		{
		}
		mtDiagVehicleStepInfo operator = (mtDiagVehicleStepInfo other)
		{
			if (this != other)
			{
				base.operator=(other);
				m_diagVehRunStepInfo = other.m_diagVehRunStepInfo;
				m_diagVehRotStepInfo = other.m_diagVehRotStepInfo;
				m_diagVehRolStepInfo = other.m_diagVehRolStepInfo;
				m_diagVehSensorInfo = other.m_diagVehSensorInfo;
			}
			return *this;
		}
		template<class _SER>
		_SER serialize(_SER sc)
		{
			base.serialize(sc);
			m_diagVehRunStepInfo.serialize(sc);
			m_diagVehRotStepInfo.serialize(sc);
			m_diagVehRolStepInfo.serialize(sc);
			m_diagVehSensorInfo.serialize(sc);
			return sc;
		}
		void DiagVehRunStepInfo (mtDiagVehicleRunStepInfo diagVehRunStepInfo) {m_diagVehRunStepInfo = diagVehRunStepInfo;}
		void DiagVehRotStepInfo (mtDiagVehicleRotateStepInfo diagVehRotStepInfo) {m_diagVehRotStepInfo = diagVehRotStepInfo;}
		void DiagVehRolStepInfo (mtDiagVehicleRollerStepInfo diagVehRolStepInfo) {m_diagVehRolStepInfo = diagVehRolStepInfo;}
		void DiagVehSensorInfo (mtDiagVehicleSensorStepInfo diagVehSensorInfo) {m_diagVehSensorInfo = diagVehSensorInfo;}

		 mtDiagVehicleRunStepInfo DiagVehRunStepInfo() { return m_diagVehRunStepInfo ; }
		 mtDiagVehicleRotateStepInfo DiagVehRotStepInfo() { return m_diagVehRotStepInfo ; }
		 mtDiagVehicleRollerStepInfo DiagVehRolStepInfo() { return m_diagVehRolStepInfo ; }
		 mtDiagVehicleSensorStepInfo DiagVehSensorInfo() { return m_diagVehSensorInfo ; }
	};*/

	//class mtDiagVehicleStepInfo : mtObject
	/*{
		int m_curRunPos;
		int m_curRunSpeed;
		sh_int8_t  m_motRunStatus;    // 0 停止， 1，运转中
	//		bool cur_speed_warning = false;
		int m_setRunPosSpeed;
		int m_setRunNegSpeed;

		int m_curRotPos;
		int m_curRotSpeed;
		sh_int8_t  m_motRotStatus;    // 0 停止， 1，运转中
	//		bool cur_speed_warning = false;
		int m_setRotPosSpeed;
		int m_setRotNegSpeed;

		int m_curRolSpeed1;
		int m_curRolSpeed2;
		sh_int8_t  m_motRolStatus1;    // 0 停止， 1，运转中
		sh_int8_t  m_motRolStatus2;    // 0 停止， 1，运转中

		//传感器参数，是其中的bit 对应状态
		int  m_sensorVehicle;
		int  m_sensorProtect;

		sh_int8_t   m_readyLight;       // 1 是就绪， 0是没就绪；
		sh_int8_t   m_initLight;        // 1 是初始化完成， 0是没完成；
		sh_int8_t   m_remoteMode;       // 1 是远控， 0是没就地；
		sh_int8_t   m_faultLight;       // 1 是没故障， 0是有故障；
		List<sh_int8_t>   m_faultVec;    //故障码序列
	public
		mtDiagVehicleStepInfo()
			:base(MTS_DIAG_VEHICLE_REQUEST_CUR_VER)
			, m_curRunPos(0)
			, m_curRunSpeed(0)
			, m_motRunStatus(0)
			, m_setRunPosSpeed(0)
			, m_setRunNegSpeed(0)

			, m_curRotPos(0)
			, m_curRotSpeed(0)
			, m_motRotStatus(0)

			, m_setRotPosSpeed(0)
			, m_setRotNegSpeed(0)

			, m_curRolSpeed1(0)
			, m_curRolSpeed2(0)
			, m_motRolStatus1(0)
			, m_motRolStatus2(0)

			, m_sensorVehicle(0)
			, m_sensorProtect(0)

			, m_readyLight(0)
			, m_initLight(0)
			, m_remoteMode(0)
			, m_faultLight(0)

		{
		}
		mtDiagVehicleStepInfo(int ncurRunPos,int ncurRunSpeed,sh_int8_t  nmotRunStatus,  int nsetRunPosSpeed,
							  int nsetRunNegSpeed,int ncurRotPos,int ncurRotSpeed,sh_int8_t  nmotRotStatus,
							  int nsetRotPosSpeed,int nsetRotNegSpeed,int ncurRolSpeed1,int ncurRolSpeed2,sh_int8_t  nmotRolStatus1,
							  sh_int8_t  nmotRolStatus2,int  nsensorVehicle,int  nsensorProtect,sh_int8_t   nreadyLight,
							  sh_int8_t   ninitLight,sh_int8_t   nremoteMode,   sh_int8_t   nfaultLight, List<sh_int8_t>   nfaultVec)
			:base(MTS_DIAG_VEHICLE_REQUEST_CUR_VER)
			, m_curRunPos(ncurRunPos)
			, m_curRunSpeed(ncurRunSpeed)
			, m_motRunStatus(nmotRunStatus)
			, m_setRunPosSpeed(nsetRunPosSpeed)
			, m_setRunNegSpeed(nsetRunNegSpeed)
			, m_curRotPos(ncurRotPos)
			, m_curRotSpeed(ncurRotSpeed)
			, m_motRotStatus(nmotRotStatus)
			, m_setRotPosSpeed(nsetRotPosSpeed)
			, m_setRotNegSpeed(nsetRotNegSpeed)
			, m_curRolSpeed1(ncurRolSpeed1)
			, m_curRolSpeed2(ncurRolSpeed2)
			, m_motRolStatus1(nmotRolStatus1)
			, m_motRolStatus2(nmotRolStatus2)

			, m_sensorVehicle(nsensorVehicle)
			, m_sensorProtect(nsensorProtect)

			, m_readyLight(nreadyLight)
			, m_initLight(ninitLight)
			, m_remoteMode(nremoteMode)
			, m_faultLight(nfaultLight)
			, m_faultVec(nfaultVec)
		{
		}
		mtDiagVehicleStepInfo( mtDiagVehicleStepInfo other)
			:base(other)
			, m_curRunPos(other.m_curRunPos)
			, m_curRunSpeed(other.m_curRunSpeed)
			, m_motRunStatus(other.m_motRunStatus)
			, m_setRunPosSpeed(other.m_setRunPosSpeed)
			, m_setRunNegSpeed(other.m_setRunNegSpeed)

			, m_curRotPos(other.m_curRotPos)
			, m_curRotSpeed(other.m_curRotSpeed)
			, m_motRotStatus(other.m_motRotStatus)

			, m_setRotPosSpeed(other.m_setRotPosSpeed)
			, m_setRotNegSpeed(other.m_setRotNegSpeed)

			, m_curRolSpeed1(other.m_curRolSpeed1)
			, m_curRolSpeed2(other.m_curRolSpeed2)
			, m_motRolStatus1(other.m_motRolStatus1)
			, m_motRolStatus2(other.m_motRolStatus2)

			, m_sensorVehicle(other.m_sensorVehicle)
			, m_sensorProtect(other.m_sensorProtect)

			, m_readyLight(other.m_readyLight)
			, m_initLight(other.m_initLight)
			, m_remoteMode(other.m_remoteMode)
			, m_faultLight(other.m_faultLight)
			, m_faultVec(other.m_faultVec)
		{
		}
		mtDiagVehicleStepInfo operator=( mtDiagVehicleStepInfo other)
		{
			if (this != other)
			{
				base.operator =(other);
				m_curRunPos = other.m_curRunPos;
				m_curRunSpeed = other.m_curRunSpeed;
				m_motRunStatus = other.m_motRunStatus;
				m_setRunPosSpeed = other.m_setRunPosSpeed;
				m_setRunNegSpeed = other.m_setRunNegSpeed;

				m_curRotPos = other.m_curRotPos;
				m_curRotSpeed = other.m_curRotSpeed;
				m_motRotStatus = other.m_motRotStatus;

				m_setRotPosSpeed = other.m_setRotPosSpeed;
				m_setRotNegSpeed = other.m_setRotNegSpeed;

				m_curRolSpeed1 = other.m_curRolSpeed1;
				m_curRolSpeed2 = other.m_curRolSpeed2;
				m_motRolStatus1 = other.m_motRolStatus1;
				m_motRolStatus2 = other.m_motRolStatus2;

				m_sensorVehicle = other.m_sensorVehicle;
				m_sensorProtect = other.m_sensorProtect;

				m_readyLight = other.m_readyLight;
				m_initLight = other.m_initLight;
				m_remoteMode = other.m_remoteMode;
				m_faultLight = other.m_faultLight;
				m_faultVec = other.m_faultVec;
			}
			return *this;
		}
		template<class _SER>
		_SER serialize(_SER sc)
		{
			base.serialize(sc);
			sc.serialize(m_curRunPos);
			sc.serialize(m_curRunSpeed);
			sc.serialize(m_motRunStatus);
			sc.serialize(m_setRunPosSpeed);
			sc.serialize(m_setRunNegSpeed);

			sc.serialize(m_curRotPos);
			sc.serialize(m_curRotSpeed);
			sc.serialize(m_motRotStatus);

			sc.serialize(setRotPosSpeed);
			sc.serialize(m_setRotNegSpeed);

			sc.serialize(m_curRolSpeed1);
			sc.serialize(m_curRolSpeed2);
			sc.serialize(m_motRolStatus1);
			sc.serialize(m_motRolStatus2);

			sc.serialize(m_sensorVehicle);
			sc.serialize(m_sensorProtect);

			sc.serialize(m_readyLight);
			sc.serialize(m_initLight);
			sc.serialize(m_remoteMode);
			sc.serialize(m_faultLight);
			sc.serialize(m_faultVec);
			return sc;
		}
		void CurRunPos(int curRunPos) { m_curRunPos = curRunPos; }
		void CurRunSpeed(int curRunSpeed) { m_curRunSpeed = curRunSpeed; }
		void MotRunStatus(sh_int8_t motRunStatus) { m_motRunStatus = motRunStatus; }
		void SetRunPosSpeed(int setRunPosSpeed) { m_setRunPosSpeed = setRunPosSpeed; }
		void SetRunNegSpeed(int setRunNegSpeed) { m_setRunNegSpeed = setRunNegSpeed; }

		void CurRotPos(int curRotPos) { m_curRotPos = curRotPos; }
		void CurRotSpeed(int curRotSpeed) { m_curRotSpeed = curRotSpeed; }
		void MotRotStatus(sh_int8_t motRotStatus) { m_motRotStatus = motRotStatus; }

		void SetRotPosSpeed(int setRotPosSpeed) { m_setRotPosSpeed = setRotPosSpeed; }
		void SetRotNegSpeed(int setRotNegSpeed) { m_setRotNegSpeed = setRotNegSpeed; }

		void CurRolSpeed1(int curRolSpeed1) { m_curRolSpeed1 = curRolSpeed1; }
		void CurRolSpeed2(int curRolSpeed2) { m_curRolSpeed2 = curRolSpeed2; }
		void MotRolStatus1(sh_int8_t motRolStatus1) { m_motRolStatus1 = motRolStatus1; }
		void MotRolStatus2(sh_int8_t motRolStatus2) { m_motRolStatus2 = motRolStatus2; }

		void SensorVehicle(int sensorVehicle) { m_sensorVehicle = sensorVehicle; }
		void SensorProtect(int sensorProtect) { m_sensorVehicle = sensorProtect; }

		void ReadyLight(sh_int8_t readyLight) { m_readyLight = readyLight; }
		void InitLight(sh_int8_t initLight) { m_initLight = initLight; }
		void RemoteMode(sh_int8_t remoteMode) { m_remoteMode = remoteMode; }
		void FaultLight(sh_int8_t faultLight) { m_faultLight = faultLight; }
		void FaultVec(List<sh_int8_t> faultVec) { m_faultVec = faultVec; }
		void FaultVec(sh_int8_t faultCode) { m_faultVec.push_back(faultCode); }

		 int  CurRunPos()  { return m_curRunPos ; }
		 int  CurRunSpeed()  { return m_curRunSpeed ; }
		 sh_int8_t  MotRunStatus()  { return m_motRunStatus ; }
		 int  SetRunPosSpeed()  { return m_setRunPosSpeed ; }
		 int  SetRunNegSpeed()  { return m_setRunNegSpeed ; }

		 int  CurRotPos()  { return m_curRotPos ; }
		 int  CurRotSpeed()  { return m_curRotSpeed ; }
		 sh_int8_t  MotRotStatus()  { return m_motRotStatus ; }

		 int  SetRotPosSpeed()  { return m_setRotPosSpeed ; }
		 int  SetRotNegSpeed()  { return m_setRotNegSpeed ; }

		 int  CurRolSpeed1()  { return m_curRolSpeed1 ; }
		 int  CurRolSpeed2()  { return m_curRolSpeed2 ; }
		 sh_int8_t  MotRolStatus1()  { return m_motRolStatus1 ; }
		 sh_int8_t  MotRolStatus2()  { return m_motRolStatus2 ; }

		 int  SensorVehicle()  { return m_sensorVehicle ; }
		 int  SensorProtect()  { return m_sensorVehicle ; }

		 sh_int8_t  ReadyLight()  { return m_readyLight ; }
		 sh_int8_t  InitLight()  { return m_initLight; }
		 sh_int8_t  RemoteMode()  { return m_remoteMode ; }
		 sh_int8_t  FaultLight()  { return m_faultLight ; }

		 List<sh_int8_t>  FaultVec()  { return m_faultVec ; }
	};
	*/

	//探测器诊断
	public class mtDiagDetectorRequest : mtObject, shISerializeable
	{
		int m_sourceId = 0;         // 加速器Id
		int m_energyType = 0;     // 能量类型 0 低能 1高能 2 双能
		ulong m_id = 0;
		string m_prn;

		emDetClctStatus m_clctType = emDetClctStatus.emClct_Unknown;
		emDetDiagRequestCmd m_detDiagReqCmd = emDetDiagRequestCmd.emDDRC_Unknown;

        public int SourceId { get => m_sourceId; set => m_sourceId = value; }
        public int EnergyType { get => m_energyType; set => m_energyType = value; }
        public ulong Id { get => m_id; set => m_id = value; }
        public string Prn { get => m_prn; set => m_prn = value; }
        public emDetClctStatus ClctType { get => m_clctType; set => m_clctType = value; }
        public emDetDiagRequestCmd DetDiagReqCmd { get => m_detDiagReqCmd; set => m_detDiagReqCmd = value; }

        public mtDiagDetectorRequest()
				: base(0)

		{
		}
		public mtDiagDetectorRequest(int nSourceId, int nEnergyType,
	string prn, emDetClctStatus nclctType, emDetDiagRequestCmd ndetDiagReqCmd)
		: base(0)

		{
			m_sourceId = nSourceId;
			m_energyType = nEnergyType;
			m_clctType = nclctType;
			m_id = 0;
			m_prn = prn;
			m_detDiagReqCmd = ndetDiagReqCmd;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_sourceId);
			sc.serialize(ref m_energyType);
			sc.serialize(ref m_id);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_clctType);
			sc.serialize(ref m_detDiagReqCmd);
			return sc;
		}

	}
	public class mtDiagDetectorResponse : mtObject, shISerializeable
	{
		ulong m_id = 0;
		string m_prn;
		uint m_result = 0; //	正确 sc_ec_Success	其它，请求失败错误码,
		public
			mtDiagDetectorResponse()
				: base(0)
		{
		}
		public mtDiagDetectorResponse(uint nresult, string prn)
		: base(0)

		{
			m_result = nresult;
			m_id = 0;
			m_prn = prn;
		}

        public ulong Id { get => m_id; set => m_id = value; }
        public string Prn { get => m_prn; set => m_prn = value; }
        public uint Result { get => m_result; set => m_result = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_id);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_result);
			return sc;
		}

	}
	
	//class mtDiagDetectorStepInfo : mtObject
	/*{
	//		string m_prn;
		shImageID_t	m_nImageID;    //prn
		uint  m_plcStatus;
		List<sh_int8_t> m_plcFaultVec;
		uint  m_detStatus;   //探测器状态 0，未初始化，1初始化中，2、连接探测器、3、就绪，4、采集、5、异常
		List<sh_int8_t> m_detFaultVec;
	public
		mtDiagDetectorStepInfo()
			:base(MTS_DIAG_DETECTOR_STEPINFO_CUR_VER)
			, m_nImageID(0)
			, m_plcStatus(0)
			, m_detStatus(0)
		{
		}
		mtDiagDetectorStepInfo( mtDiagDetectorStepInfo other)
			:base(other)
			, m_nImageID(other.m_nImageID)
	//			, m_prn(other.m_prn)
			, m_plcStatus(other.m_plcStatus)
			, m_plcFaultVec(other.m_plcFaultVec)
			, m_detStatus(other.m_detStatus)
			, m_detFaultVec(other.m_detFaultVec)
		{
		}
		mtDiagDetectorStepInfo operator=( mtDiagDetectorStepInfo other)
		{
			if (this != other)
			{
				base.operator =(other);
				m_nImageID = other.m_nImageID;
	//				m_prn = other.m_prn;
				m_plcStatus = other.m_plcStatus;
				m_plcFaultVec = other.m_plcFaultVec;
				m_detStatus = other.m_detStatus;
				m_detFaultVec = other.m_detFaultVec;
			}
			return *this;
		}
		template<class _SER>
		_SER serialize(_SER sc)
		{
			base.serialize(sc);
			sc.serialize(m_nImageID);
	//			sc.serialize(m_prn);
			sc.serialize(m_plcStatus);
			sc.serialize(m_plcFaultVec);
			sc.serialize(m_detStatus);
			sc.serialize(m_detFaultVec);

			return sc;
		}

		void PlcStatus(int plcStatus) { m_plcStatus = plcStatus;}
		void PlcFaultVec(sh_int8_t plcFaultCode) { m_plcFaultVec.push_back(plcFaultCode); }
		void PlcFaultVec(List<sh_int8_t> plcFaultVec) { m_plcFaultVec = plcFaultVec; }
		void DetStatus(int detStatus) { m_detStatus = detStatus;}
		void DetFaultVec(sh_int8_t detFaultCode) { m_detFaultVec.push_back(detFaultCode);}
		void DetFaultVec(List<sh_int8_t> detFaultVec) { m_detFaultVec = detFaultVec;}

		 int PlcStatus() { return  m_plcStatus; }
		 List<sh_int8_t> PlcFaultVec() { return  m_plcFaultVec; }
		 int DetStatus() { return  m_detStatus; }
		 List<sh_int8_t> DetFaultVec() { return  m_detFaultVec; }

		void ImageID(shImageID_t nImageID) { m_nImageID = nImageID; }
		shImageID_t ImageID()  { return m_nImageID; }
	//		 string ImagePath()  { return m_prn; };
	//		void ImagePath(string prn) { m_prn = prn; };
	};
	*/

	//光源诊断
	public class mtDiagSourceRequest : mtObject, shISerializeable
	{
		int m_sourceId = 0;  // 加速器id
		int m_energyType = 0;     // 能量类型 0 低能 1高能 2 双能
		emTrigMode m_trigMode = emTrigMode.emTrig_Unknown;
		uint m_repetFre = 0;
		emDeviceRequestCmd m_sourceDiagCmd = emDeviceRequestCmd.emDRC_Unknown;

        public int SourceId { get => m_sourceId; set => m_sourceId = value; }
        public int EnergyType { get => m_energyType; set => m_energyType = value; }
        public emTrigMode TrigMode { get => m_trigMode; set => m_trigMode = value; }
        public uint RepetFre { get => m_repetFre; set => m_repetFre = value; }
        public emDeviceRequestCmd SourceDiagCmd { get => m_sourceDiagCmd; set => m_sourceDiagCmd = value; }


        public
			mtDiagSourceRequest()
				: base(0)
		{
		}
		public mtDiagSourceRequest(int nsourceId, int nenergyType, emTrigMode ntrigMode,
			uint nrepetFre, emDeviceRequestCmd nsourceDiagCmd)
				: base(0)

		{
			m_sourceId = nsourceId;
			m_energyType = nenergyType;
			m_trigMode = ntrigMode;
			m_repetFre = nrepetFre;
			m_sourceDiagCmd = nsourceDiagCmd;
		}



        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_sourceId);
			sc.serialize(ref m_energyType);
			sc.serialize(ref m_trigMode);
			sc.serialize(ref m_repetFre);
			sc.serialize(ref m_sourceDiagCmd);
			return sc;
		}

	}
	public class mtDiagSourceResponse : mtObject, shISerializeable
	{
		uint m_result = 0; //	正确 sc_ec_Success	其它，请求失败错误码,
		public	mtDiagSourceResponse()
				: base(0)
		{
		}
		public mtDiagSourceResponse(uint nresult)
				: base(0)
		{
			 m_result = nresult;
		}

        public uint Result { get => m_result; set => m_result = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_result);
			return sc;
		}

	}
	
	//class mtDiagSourceStepInfo : mtObject
	/*{
	 sh_int8_t  m_sourceStatus;               //加速器状态；1正在预热、2预热完成、3准备就绪。
	int  m_heaterCur;           //加速器灯丝电流；
	int  m_magnCur;           //加速器磁控管电流；
	int  m_titaCur;           //加速器钛泵电流；
	int  m_meanCur;           //加速器平均电流；
	int  m_meanMagnCur;           //加速器磁控管电流；
	int  m_chargeCur;           //加速器充电电源电流；

	int  m_chargeVol;           //加速器充电电源电压；
	int  m_auxChargeVol;           //加速器辅助电源电压；
	int  m_heaterVol;           //加速器枪电源电压；
	int  m_magnHeater;           //加速器磁控管灯丝电源；

	int  m_fipFre;            //加速器触发频率；
	int  m_dosageRate;           //加速器磁控管灯丝电源；
	sh_int8_t  m_readyLight;        //加速器就绪指示灯
	int  m_preReadyLight;     //加速器初始化完成-故障指示灯。
	List<int>  m_faultVec;              //加速器故障码
	//		sh_int64_t  m_plcFault;                 //加速器PLC反馈故障
	public
	mtDiagSourceStepInfo()
		:base(MTS_DIAG_SOURCE_STEPINFO_CUR_VER)
		, m_sourceStatus(0)
		, m_heaterCur(0)
		, m_magnCur(0)
		, m_titaCur(0)
		, m_meanCur(0)
		, m_meanMagnCur(0)
		, m_chargeCur(0)

		, m_chargeVol(0)
		, m_auxChargeVol(0)
		, m_heaterVol(0)
		, m_magnHeater(0)

		, m_fipFre(0)
		, m_dosageRate(0)
		, m_readyLight(0)
		, m_preReadyLight(0)
	{
	}
	mtDiagSourceStepInfo(sh_int8_t  nsourceStatus,int  nheaterCur,int  nmagnCur,int  ntitaCur,int  nmeanCur,
						 int  nmeanMagnCur,int  nchargeCur,int  nchargeVol,int  nauxChargeVol,
						 int  nheaterVol,int  nmagnHeater,int  nfipFre,int  ndosageRate,
						 sh_int8_t  nreadyLight,int  npreReadyLight,List<int>  nfaultVec)
		:base(MTS_DIAG_SOURCE_STEPINFO_CUR_VER)
		, m_sourceStatus(nsourceStatus)
		, m_heaterCur(nheaterCur)
		, m_magnCur(nmagnCur)
		, m_titaCur(ntitaCur)
		, m_meanCur(nmeanCur)
		, m_meanMagnCur(nmeanMagnCur)
		, m_chargeCur(nchargeCur)

		, m_chargeVol(nchargeVol)
		, m_auxChargeVol(nauxChargeVol)
		, m_heaterVol(nheaterVol)
		, m_magnHeater(nmagnHeater)

		, m_fipFre(nfipFre)
		, m_dosageRate(ndosageRate)
		, m_readyLight(nreadyLight)
		, m_preReadyLight(npreReadyLight)
		, m_faultVec(nfaultVec)
	{
	}
	mtDiagSourceStepInfo( mtDiagSourceStepInfo other)
		:base(other)
		, m_sourceStatus(other.m_sourceStatus)
		, m_heaterCur(other.m_heaterCur)
		, m_magnCur(other.m_magnCur)
		, m_titaCur(other.m_titaCur)
		, m_meanCur(other.m_meanCur)
		, m_meanMagnCur(other.m_meanMagnCur)
		, m_chargeCur(other.m_chargeCur)

		, m_chargeVol(other.m_chargeVol)
		, m_auxChargeVol(other.m_auxChargeVol)
		, m_heaterVol(other.m_heaterVol)
		, m_magnHeater(other.m_magnHeater)

		, m_fipFre(other.m_fipFre)
		, m_dosageRate(other.m_dosageRate)
		, m_readyLight(other.m_readyLight)
		, m_preReadyLight(other.m_preReadyLight)
		, m_faultVec(other.m_faultVec)
	{
	}
	mtDiagSourceStepInfo operator=( mtDiagSourceStepInfo other)
	{
		if (this != other)
		{
			base.operator =(other);
			m_sourceStatus = other.m_sourceStatus;
			m_heaterCur = other.m_heaterCur;
			m_magnCur = other.m_magnCur;
			m_titaCur = other.m_titaCur;
			m_meanCur = other.m_meanCur;
			m_meanMagnCur = other.m_meanMagnCur;
			m_chargeCur = other.m_chargeCur;

			m_chargeVol = other.m_chargeVol;
			m_auxChargeVol = other.m_auxChargeVol;
			m_heaterVol = other.m_heaterVol;
			m_magnHeater = other.m_magnHeater;

			m_fipFre = other.m_fipFre;
			m_dosageRate = other.m_dosageRate;
			m_readyLight = other.m_readyLight;
			m_preReadyLight = other.m_preReadyLight;
			m_faultVec = other.m_faultVec;
		}
		return *this;
	}
	template<class _SER>
	_SER serialize(_SER sc)
	{
		base.serialize(sc);
		sc.serialize(m_sourceStatus);
		sc.serialize(m_heaterCur);
		sc.serialize(m_magnCur);
		sc.serialize(m_titaCur);
		sc.serialize(m_meanCur);
		sc.serialize(m_meanMagnCur);
		sc.serialize(m_chargeCur);

		sc.serialize(m_chargeVol);
		sc.serialize(m_auxChargeVol);
		sc.serialize(m_heaterVol);
		sc.serialize(m_magnHeater);

		sc.serialize(m_fipFre);
		sc.serialize(m_dosageRate);
		sc.serialize(m_readyLight);
		sc.serialize(m_preReadyLight);
		sc.serialize(m_faultVec);
		return sc;
	}
	void  SourceStatus (sh_int8_t sourceStatus){  m_sourceStatus= sourceStatus;}
	void  HeaterCur (int heaterCur){  m_heaterCur= heaterCur;}
	void  MagnCur (int magnCur){  m_magnCur= magnCur;}
	void  TitaCur (int titaCur){  m_titaCur= titaCur;}
	void  MeanCur (int meanCur){  m_meanCur= meanCur;}
	void  MeanMagnCur (int meanMagnCur){  m_meanMagnCur= meanMagnCur;}
	void  ChargeCur (int chargeCur){  m_chargeCur= chargeCur;}

	void  ChargeVol (int chargeVol){  m_chargeVol= chargeVol;}
	void  AuxChargeVol (int auxChargeVol){  m_auxChargeVol= auxChargeVol;}
	void  HeaterVol (int heaterVol){  m_heaterVol= heaterVol;}
	void  MagnHeater(int magnHeater) { m_magnHeater= magnHeater; }

	void  FipFre (int fipFre){  m_fipFre= fipFre;}
	void  DosageRate (int dosageRate){  m_dosageRate= dosageRate;}
	void  ReadyLight (sh_int8_t readyLight){  m_readyLight= readyLight;}
	void  PreReadyLight (int preReadyLight){  m_preReadyLight= preReadyLight;}
	void  FaultVec (int faultCode){  m_faultVec.push_back(faultCode) ;}
	void  FaultVec( List<int> faultVec) { m_faultVec = faultVec; }

	 sh_int8_t  SourceStatus()  { return m_sourceStatus; }
	 int  HeaterCur()  { return m_heaterCur; }
	 int  MagnCur()  { return m_magnCur; }
	 int  TitaCur()  { return m_titaCur; }
	 int  MeanCur()  { return m_meanCur; }
	 int  MeanMagnCur()  { return m_meanMagnCur; }
	 int  ChargeCur()  { return m_chargeCur; }

	 int  ChargeVol()  { return m_chargeVol; }
	 int  AuxChargeVol()  { return m_auxChargeVol; }
	 int  HeaterVol()  { return m_heaterVol; }
	 int  MagnHeater()  { return m_magnHeater; }

	 int  FipFre()  { return m_fipFre; }
	 int  DosageRate()  { return m_dosageRate; }
	 sh_int8_t  ReadyLight()  { return m_readyLight; }
	 int  PreReadyLight()  { return m_preReadyLight; }
	 List<int>  FaultVec()  { return m_faultVec; }
	};
	*/
	//诊断屏蔽门的结构定义

	//class mtDiagDoorRequest : mtObject
	/*{
	//暂不实现
	public
	mtDiagDoorRequest()
		:base(MTS_DIAG_DOOR_REQUEST_CUR_VER)
	{
	}
	mtDiagDoorRequest( mtDiagDoorRequest other)
		:base(other)
	{
	}
	mtDiagDoorRequest operator=( mtDiagDoorRequest other)
	{
		if (this != other)
		{
			base.operator =(other);
		}
		return *this;
	}
	template<class _SER>
	_SER serialize(_SER sc)
	{
		base.serialize(sc);
		return sc;
	}
	};

	//诊断中转台的结构定义

	class mtDiagTransPlatformRequest : mtObject
	{
	//暂不实现
	public
	mtDiagTransPlatformRequest()
		:base(MTS_DIAG_SOURCE_STEPINFO_CUR_VER)
	{
	}
	mtDiagTransPlatformRequest( mtDiagTransPlatformRequest other)
		:base(other)
	{
	}
	mtDiagTransPlatformRequest operator=( mtDiagTransPlatformRequest other)
	{
		if (this != other)
		{
			base.operator =(other);
		}
		return *this;
	}
	template<class _SER>
	_SER serialize(_SER sc)
	{
		base.serialize(sc);
		return sc;
	}
	};

	// 诊断转运车的结构定义

	class mtDiagTransVehicleRequest : mtObject
	{
	//暂不实现
	public
	mtDiagTransVehicleRequest()
		:base(MTS_DIAG_SOURCE_STEPINFO_CUR_VER)
	{
	}
	mtDiagTransVehicleRequest( mtDiagTransVehicleRequest other)
		:base(other)
	{
	}
	mtDiagTransVehicleRequest operator=( mtDiagTransVehicleRequest other)
	{
		if (this != other)
		{
			base.operator =(other);
		}
		return *this;
	}
	template<class _SER>
	_SER serialize(_SER sc)
	{
		base.serialize(sc);
		return sc;
	}
	};

	class mtAutoStepInfo : mtObject
	{
	int m_nMark; //当前行走至的流程 1 开始自动诊断；2 关闭防护门 。。。
	mtPowerRoomInfo  m_powerRoomInfo;
	std::map<int, mtDiagVehicleRunStepInfo>  m_diagVehicleRunInfo;  //key是行驶至位置点，value是对应读取的数据；
	std::map<int, mtDiagVehicleRotateStepInfo>  m_diagVehicleRotInfo;  //key是旋转至位置点，value是对应读取的数据；
	std::map<int, mtDiagVehicleRollerStepInfo>  m_diagVehicleRolInfo;  //key是正转反转等编号，value是对应读取的数据；
	mtDiagVehicleSensorStepInfo m_diagVhicleSensorinfo;
	std::map<int, mtDiagSourceStepInfo>      m_diagSourceInfo;      //key是加速器编号， value是读取的对应值
	public
	mtAutoStepInfo()
		:base(MTS_AUTO_DIAG_STEPINFO_CUR_VER)
		, m_nMark(0)
	{
	}
	mtAutoStepInfo( mtAutoStepInfo other)
		:base(other)
		, m_nMark(other.m_nMark)
		, m_powerRoomInfo(other.m_powerRoomInfo)
		, m_diagVehicleRunInfo(other.m_diagVehicleRunInfo)
		, m_diagVehicleRotInfo(other.m_diagVehicleRotInfo)
		, m_diagVehicleRolInfo(other.m_diagVehicleRolInfo)
		, m_diagVhicleSensorinfo(other.m_diagVhicleSensorinfo)
		, m_diagSourceInfo(other.m_diagSourceInfo)
	{
	}
	mtAutoStepInfo operator=( mtAutoStepInfo other)
	{
		if (this != other)
		{
			base.operator =(other);
			m_nMark = other.m_nMark;
			m_powerRoomInfo = other.m_powerRoomInfo;
			m_diagVehicleRunInfo = other.m_diagVehicleRunInfo;
			m_diagVehicleRotInfo = other.m_diagVehicleRotInfo;
			m_diagVehicleRolInfo = other.m_diagVehicleRolInfo;
			m_diagVhicleSensorinfo = other.m_diagVhicleSensorinfo;
			m_diagSourceInfo = other.m_diagSourceInfo;
		}
		return *this;
	}
	template<class _SER>
	_SER serialize(_SER sc)
	{
		base.serialize(sc);
		sc.serialize(m_nMark);
		m_powerRoomInfo.serialize(sc);
		sc.serialize(m_diagVehicleRunInfo);
		sc.serialize(m_diagVehicleRotInfo);
		sc.serialize(m_diagVehicleRolInfo);
		m_diagVhicleSensorinfo.serialize(sc);
		//sc.serialize(m_diagVhicleSensorinfo);
		sc.serialize(m_diagSourceInfo);
		return sc;
	}
	void Mark(int nMark) { m_nMark; }
	void DiagVhicleSensorinfo(mtPowerRoomInfo powerRoomInfo) { m_powerRoomInfo = powerRoomInfo; }
	void DiagVehicleRunInfo(int nVehPos, mtDiagVehicleRunStepInfo diagVehRunInfo) { m_diagVehicleRunInfo.insert(std::make_pair(nVehPos, diagVehRunInfo)); }
	void DiagVehicleRotInfo(int nSwive, mtDiagVehicleRotateStepInfo diagVehRotInfo) { m_diagVehicleRotInfo.insert(std::make_pair(nSwive, diagVehRotInfo)); }
	void DiagVehicleRolInfo(int nRoll, mtDiagVehicleRollerStepInfo diagVehRolInfo) { m_diagVehicleRolInfo.insert(std::make_pair(nRoll, diagVehRolInfo)); }
	void DiagVehicleRunInfo(std::map<int, mtDiagVehicleRunStepInfo> diagVehRunInfo) { m_diagVehicleRunInfo = diagVehRunInfo; }
	void DiagVehicleRotInfo(std::map<int, mtDiagVehicleRotateStepInfo> diagVehRotInfo) { m_diagVehicleRotInfo = diagVehRotInfo; }
	void DiagVehicleRolInfo(std::map<int, mtDiagVehicleRollerStepInfo> diagVehRolInfo) { m_diagVehicleRolInfo = diagVehRolInfo; }
	void DiagVhicleSensorinfo(mtDiagVehicleSensorStepInfo diagVehSenInfo) { m_diagVhicleSensorinfo = diagVehSenInfo; }
	void DiagSourceInfo(int nSourceId, mtDiagSourceStepInfo diagSourceInfo) { m_diagSourceInfo.insert(std::make_pair(nSourceId, diagSourceInfo)); }
	void DiagSourceInfo(std::map<int, mtDiagSourceStepInfo> diagSourceInfo) { m_diagSourceInfo = diagSourceInfo; }

	 int Mark() { return m_nMark; }
	 mtPowerRoomInfo PowerRoomInfo()  { return m_powerRoomInfo; }
	 std::map<int, mtDiagVehicleRunStepInfo> DiagVehicleRunInfo() { return m_diagVehicleRunInfo; }
	 std::map<int, mtDiagVehicleRotateStepInfo> DiagVehicleRotInfo() { return m_diagVehicleRotInfo; }
	 std::map<int, mtDiagVehicleRollerStepInfo> DiagVehicleRolInfo() { return m_diagVehicleRolInfo; }
	 mtDiagVehicleSensorStepInfo DiagVhicleSensorinfo() { return m_diagVhicleSensorinfo; }
	 std::map<int, mtDiagSourceStepInfo> DiagSourceInfo() { return m_diagSourceInfo; }
	};
	*/

	public class mtAutoDiagStepInfo : mtObject, shISerializeable
	{
		ulong  m_id;
		string m_prn;
		int    m_nStep; //当前行走至的流程 1 开始自动诊断；2 关闭防护门 。。。
		bool   m_bFinish;
		public mtAutoDiagStepInfo()
				: base(0)
		{
		}

        public ulong Id { get => m_id; set => m_id = value; }
        public string Prn { get => m_prn; set => m_prn = value; }
        public int Step { get => m_nStep; set => m_nStep = value; }
        public bool IsFinish { get => m_bFinish; set => m_bFinish = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_id);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_nStep);
			sc.serialize(ref m_bFinish);

			return sc;
		}
	}
	public class mtAutoDiagReport : mtObject, shISerializeable
	{
		ulong m_id = 0;
		string m_prn;
		string m_strReport;


        public ulong Id { get => m_id; set => m_id = value; }
        public string Prn { get => m_prn; set => m_prn = value; }
        public string Report { get => m_strReport; set => m_strReport = value; }

        public		mtAutoDiagReport()
				: base(0)

		{
		}

		public mtAutoDiagReport(ulong id, string strReport)
				: base(0)

		{
			m_id = id;
			m_strReport = strReport;
		}

		public mtAutoDiagReport(string prn, string strReport)
				: base(0)

		{
			m_prn=prn;
			m_strReport =strReport;
		}

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_id);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_strReport);
			return sc;
		}
	}
	public class mtSaveRawOriData : mtObject, shISerializeable
	{
		bool m_bSave = false;

        public bool IsSave { get => m_bSave; set => m_bSave = value; }

        public	mtSaveRawOriData()
				: base(0)
		{
		}

    

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_bSave);
			return sc;
		}
	}
	public class mtDeviceOpInfo : mtObject, shISerializeable
	{
		ulong m_nBootTime = 0;
		ulong m_nBootNum = 0;
		ulong m_nTotalTime = 0;

		List<ulong> m_vecBeamTime = new List<ulong>();
		List<ulong> m_vecTotalBeamTime = new List<ulong>();

		ulong m_nAvgBeamTime = 0;

		ulong m_nTotalCargoNum = 0;
		ulong m_nTotalSusCargoNum = 0;

		public	mtDeviceOpInfo()
				: base(0)
		{
		}

        public ulong BootTime { get => m_nBootTime; set => m_nBootTime = value; }
        public ulong BootNum { get => m_nBootNum; set => m_nBootNum = value; }
        public ulong TotalTime { get => m_nTotalTime; set => m_nTotalTime = value; }
        public List<ulong> BeamTime { get => m_vecBeamTime; set => m_vecBeamTime = value; }
        public List<ulong> TotalBeamTime { get => m_vecTotalBeamTime; set => m_vecTotalBeamTime = value; }
        public ulong AvgBeamTime { get => m_nAvgBeamTime; set => m_nAvgBeamTime = value; }
        public ulong TotalCargoNum { get => m_nTotalCargoNum; set => m_nTotalCargoNum = value; }
        public ulong TotalSusCargoNum { get => m_nTotalSusCargoNum; set => m_nTotalSusCargoNum = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nBootTime);
			sc.serialize(ref m_nBootNum);
			sc.serialize(ref m_nTotalTime);
			sc.serialize(ref m_nAvgBeamTime);
			sc.serialize(ref m_nTotalCargoNum);
			sc.serialize(ref m_nTotalSusCargoNum);
			sc.serialize(ref m_vecBeamTime);
			sc.serialize(ref m_vecTotalBeamTime);
			return sc;
		}
	}
	public class mtMaintainRequest : mtObject, shISerializeable
	{
		List<emMaintainType> m_vecMaintainTypes = new List<emMaintainType>();     //维护类别

		public	mtMaintainRequest()
				: base(0)
		{
		}

        public List<emMaintainType> MaintainTypes { get => m_vecMaintainTypes; set => m_vecMaintainTypes = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_vecMaintainTypes);

			return sc;
		}
	}
	public class mtMaintainResponse : mtObject, shISerializeable
	{
		emMaintainType m_emMaintainType = emMaintainType.emMaintainType_Unknown;            //维护类别
		List<ulong> m_vecValues = new List<ulong>();               //维护类别对应的数值，如加速器1~3的运行时长


		public	mtMaintainResponse()
				: base(0)
		{
		}

        public emMaintainType MaintainType { get => m_emMaintainType; set => m_emMaintainType = value; }
        public List<ulong> Values { get => m_vecValues; set => m_vecValues = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_emMaintainType);
			sc.serialize(ref m_vecValues);

			return sc;
		}
	}
	/// <summary>
	/// 性能检验自动统计结果
	/// RCC => SMS
	/// </summary>
	public class mtAutoStatResult : mtObject, shISerializeable
	{
		string m_strPrn;
		uint m_nResult = 0;

        public string Prn { get => m_strPrn; set => m_strPrn = value; }
        public uint Result { get => m_nResult; set => m_nResult = value; }

        public mtAutoStatResult()
			: base(0)

		{
		}

		public mtAutoStatResult(string strPrn, uint nResult)
			:base(0)
	
		{
			m_strPrn=strPrn;
			m_nResult=nResult;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strPrn);
			sc.serialize(ref m_nResult);

			return sc;
		}
	}
	/// <summary>
	/// 性能检验或标定结果
	/// RCC => SMS
	/// </summary>
	public class mtVerifCalibResult : mtObject, shISerializeable
	{
		emPerformanceVerifType m_pvType = emPerformanceVerifType.emPvType_Unknown;
		uint m_nResult = 0;      // 0-性能检验失败，1-性能检验结束，重建参数可用。,2-性能检验结束,重建参数偏差过大 3-后标定成功,4-后标定失败
		uint m_nErrorCode = 0;   // 失败错误码

        public emPerformanceVerifType PvType { get => m_pvType; set => m_pvType = value; }
        public uint Result { get => m_nResult; set => m_nResult = value; }
        public uint ErrorCode { get => m_nErrorCode; set => m_nErrorCode = value; }

        public mtVerifCalibResult()
			: base(0)
		{
		}

		public mtVerifCalibResult(emPerformanceVerifType pvType, uint nResult, uint nErrorCode)
			:base(0)

		{
			m_pvType=pvType;
			m_nResult=nResult;
			m_nErrorCode=nErrorCode;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_pvType);
			sc.serialize(ref m_nResult);
			sc.serialize(ref m_nErrorCode);

			return sc;
		}
	}
	/// <summary>
	/// 性能检验或标定命令
	/// SMS => RCC
	/// </summary>
	public class mtVerifCalibCmd : mtObject, shISerializeable
	{
		emPerformanceVerifType m_pvType = emPerformanceVerifType.emPvType_Unknown;
		uint m_nScanTimes;   // 扫描次数
		ulong m_finishTime; // 最后一次扫描结束的时间，可能没啥用

        public emPerformanceVerifType PvType { get => m_pvType; set => m_pvType = value; }
        public uint ScanTimes { get => m_nScanTimes; set => m_nScanTimes = value; }
        public ulong FinishTime { get => m_finishTime; set => m_finishTime = value; }

        public mtVerifCalibCmd()
			: base(0)
		{
		}

		public mtVerifCalibCmd(emPerformanceVerifType pvType, uint nScanTimes, ulong finishTime)
			: base(0)

		{
			m_pvType=pvType;
			m_nScanTimes=nScanTimes;
			m_finishTime=finishTime;
		}


        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_pvType);
			sc.serialize(ref m_nScanTimes);
			sc.serialize(ref m_finishTime);

			return sc;
		}
	}
	// 诊断防护门请求
	public class mtDiagProtectiveDoorRequest : mtObject, shISerializeable
	{
		uint m_nDoorNo = 0;              // 防护门编号：0-未知，1-入口防护门，2-出口防护门
		uint m_cmdDoorOperation = 0;     // 防护门的操作类型：0-未知，1-开门，2-关门，3-停止

        public uint DoorNo { get => m_nDoorNo; set => m_nDoorNo = value; }
        public uint CmdDoorOperation { get => m_cmdDoorOperation; set => m_cmdDoorOperation = value; }

        public mtDiagProtectiveDoorRequest()
			: base(0)
		{
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nDoorNo);
			sc.serialize(ref m_cmdDoorOperation);

			return sc;
		}
	}
	// 诊断防护门回复
	public class mtDiagProtectiveDoorResponse : mtObject, shISerializeable
	{
		uint m_nResult = 0;    // 请求的结果（非0则为错误码）

        public uint Result { get => m_nResult; set => m_nResult = value; }

        public mtDiagProtectiveDoorResponse()
			: base(0)

		{
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nResult);
			return sc;
		}
	}
	// 诊断防护门请求
	public class DiagTransferTransportRequest : mtObject, shISerializeable
	{
		int m_nLiftingDir = 0;    // 升降操作类型：-1-下降，1-上升
		emDeviceRequestCmd m_emLiftingCmd = emDeviceRequestCmd.emDRC_Unknown;    // 升降操作命令：运行、停止、复位
		int m_nRollerDir = 0;    // 辊筒操作类型：-1-倒转，1-正转
		emDeviceRequestCmd m_emRollerCmd = emDeviceRequestCmd.emDRC_Unknown;    // 辊筒操作命令：运行、停止、复位

		public DiagTransferTransportRequest()
			: base(0)
		{
		}

        public int LiftingDir { get => m_nLiftingDir; set => m_nLiftingDir = value; }
        public emDeviceRequestCmd LiftingCmd { get => m_emLiftingCmd; set => m_emLiftingCmd = value; }
        public int RollerDir { get => m_nRollerDir; set => m_nRollerDir = value; }
        public emDeviceRequestCmd RollerCmd { get => m_emRollerCmd; set => m_emRollerCmd = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nLiftingDir);
			sc.serialize(ref m_emLiftingCmd);
			sc.serialize(ref m_nRollerDir);
			sc.serialize(ref m_emRollerCmd);

			return sc;
		}
	}
	// 诊断防护门回复
	public class DiagTransferTransportResponse : mtObject, shISerializeable
	{
		uint m_nResult = 0;    // 请求的结果（非0则为错误码）

		public DiagTransferTransportResponse()
			: base(0)
			
		{
		}

        public uint Result { get => m_nResult; set => m_nResult = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nResult);

			return sc;
		}
	}
	/// <summary>
	/// 扫描模式
	/// SMS => RCC
	/// </summary>
	public class mtScanMode : mtObject, shISerializeable
	{
		emScanType m_scanType = emScanType.emScanType_Unknown;

        public emScanType ScanType { get => m_scanType; set => m_scanType = value; }

        public mtScanMode()
			: base(0)
		{
		}

		public mtScanMode(emScanType scanType)
			: base(0)
		
		{
			m_scanType = scanType;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_scanType);

			return sc;
		}
	}

}
